Auto merge of #4806 - alexcrichton:fix-infinite-loop, r=matklad
authorbors <bors@rust-lang.org>
Tue, 12 Dec 2017 05:41:53 +0000 (05:41 +0000)
committerbors <bors@rust-lang.org>
Tue, 12 Dec 2017 05:41:53 +0000 (05:41 +0000)
commitbc9ffdf66fe0796b83585d09519a3beecd9a079d
treebed80b1cf81a89c5315e925e0f168a115a2d577e
parent77d44e7d567017dd0103d61981c89b4e556aeba8
parent4f0b8f88085572f4f888fb49780ff0a76ce42ac4
Auto merge of #4806 - alexcrichton:fix-infinite-loop, r=matklad

Fix an infinite loop in error reporting

The `path_to_root` function unfortunately didn't account for cycles in the
dependency graph introduced through dev-dependencies, so if a cycle was present
then the function would infinitely loop pushing items onto a vector.

This commit fixes the infinite loop and also touches up the reporting to be a
little more consistent with the rest of Cargo